FROM php:7.4.24-fpm-alpine
RUN docker-php-source extract
RUN apk add --no-cache libstdc++
RUN curl -o /tmp/redis-5.3.4.tgz http://pecl.php.net/get/redis-5.3.4.tgz \
    && tar -zxvf /tmp/redis-5.3.4.tgz -C /tmp/ \
    && mv /tmp/redis-5.3.4 /usr/src/php/ext/redis
RUN curl -o /tmp/swoole-4.7.1.tgz http://pecl.php.net/get/swoole-4.7.1.tgz \
    && tar -zxvf /tmp/swoole-4.7.1.tgz -C /tmp/ \
    && mv /tmp/swoole-4.7.1 /usr/src/php/ext/swoole
RUN curl -o /tmp/inotify-3.0.0.tgz http://pecl.php.net/get/inotify-3.0.0.tgz \
    && tar -zxvf /tmp/inotify-3.0.0.tgz -C /tmp/ \
    && mv /tmp/inotify-3.0.0 /usr/src/php/ext/inotify \
    && rm -rf /tmp/*
RUN RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install redis pdo_mysql inotify swoole
RUN docker-php-source delete
EXPOSE 1215
